package com.ciaojian.bytedance.vo.bytedance;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class ByteDanceProductVo {
    private String next_cursor; //用于查询下一页
    private boolean has_more; //是否有下一页
    private List<ProductOnlineListBean> product_online_list;

    @Data
    public static class ProductOnlineListBean implements Serializable {

        private ProductBean product;
        private int online_status;
        private CommissionInfoBean commission_info;
        private SkuBean sku;

        @Data
        public static class ProductBean implements Serializable {
            private String category_full_name;
            private int create_time;
            private long creator_account_id;
            private long owner_account_id;
            private String product_name;
            private AttrKeyValueMapBean attr_key_value_map;
            private int sold_end_time;
            private int update_time;
            private int product_type;
            private int category_id;
            private int sold_start_time;
            private String account_name;
            private String product_id;
            private String serve_notice;
            private int biz_line;
            private List<PoiListBean> poi_list;

            @Data
            public static class AttrKeyValueMapBean implements Serializable {
                /**
                 * can_no_use_date : {"enable":false}
                 * use_time : {"use_time_type":1}
                 * real_name_info : {"enable":false,"scene":0}
                 * appointment : {"need_appointment":false,"ahead_time_type":1}
                 * superimposed_discounts : false
                 * auto_renew : true
                 * rec_person_num : 1
                 * description_rich_text : [{"note_type":1,"content":"9.9限时活动，自购买日起，15天有效，过期自动退哦！\n注：仅限潮剪新客户使用（未曾授权信息）\n（新客指客户本人未曾在任何一家潮剪消费过）\n新客团购券，小程序上每个手机号仅能使用一次\n⚠️本店仅提供剪发、吹头、吸发服务！是吸剪吹，不是洗剪吹哦～\n剪发服务流程：\n1.打开【潮剪】小程序\n2.选择你想去的门店→点击【去剪发】\n3.选择你心仪的发型师→点击【取号】，进行排队等待服务。\n4. 出示券码给发型师操作核销。\n16家门店可用：\n越秀区：\n公园前地铁店\n海珠区：\n万宜华轩店；上渡路店；中大东门店；嘉轩街店；革新路店；\n鹭江地铁站店；大塘地铁站店\n天河区：\n兴盛路店；黄埔大道西店；石牌西店；东方宝泰店；星座花园店\n广州东站地铁店\n荔湾区：\n广钢新城店\n坑口地铁站店"}]
                 * environment_image_list : [{"url":"https://p9-sign.douyinpic.com/obj/douyin-user-image-file/a0cf55eb16949f82ac79119a82955f19?x-expires=1671098400\u0026x-signature=Y1c1adzUkhTv8%2BjT3nmAKXkcJg4%3D\u0026from=709197913"},{"url":"https://p9-sign.douyinpic.com/obj/douyin-user-image-file/4c041cb6e11cc1ede6d7ea91f3ead79e?x-expires=1671098400\u0026x-signature=1%2FHfxWpMu4pBrn1%2Fi85A7ulET%2FU%3D\u0026from=709197913"},{"url":"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/eee207de656c7da82045775cda083c44?x-expires=1671098400\u0026x-signature=U98%2BCsKLgt9H0YteUlMr2FSQV98%3D\u0026from=709197913"},{"url":"https://p9-sign.douyinpic.com/obj/douyin-user-image-file/78e7fa5cb311d27f3eea4675c66749b4?x-expires=1671098400\u0026x-signature=bQcrHw1Ic98QciIkcH6PuW84FJs%3D\u0026from=709197913"},{"url":"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/d5c81e8fc4791a2ea73206c0b25ae87c?x-expires=1671098400\u0026x-signature=bAP5PCro6HU91QZV6bkGWATIk4M%3D\u0026from=709197913"}]
                 * show_channel : 1
                 * customer_reserved_info : {"allow":true,"allow_tel":true}
                 * image_list : [{"url":"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/2a63d205cf8522d5f0a6716e3903c4a9?x-expires=1671098400\u0026x-signature=V7nQ8%2FEKUQzOnX2y%2FrTWM1JjM%2BM%3D\u0026from=709197913"},{"url":"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/b1d732398a295d98ac3921d31c3eca5e?x-expires=1671098400\u0026x-signature=PBtjqMo6vDBOSw8KShus%2FwSbQ38%3D\u0026from=709197913"}]
                 * use_date : {"use_date_type":2,"day_duration":15,"use_start_date":"","use_end_date":"","days_of_week":null}
                 */

                private CanNoUseDateBaen can_no_use_date;
                private UseTimeBaen use_time;
                private RealNameInfoBaen real_name_info;
                private AppointmentBean appointment;
                private String superimposed_discounts;
                private String SubTitle;;
                private String auto_renew;
                private String rec_person_num;
                private List<DescriptionRichTextBaen> description_rich_text;
                private List<EnvironmentImageListBaen> environment_image_list;
                private String show_channel;
                private CustomerReservedInfoBaen customer_reserved_info;
                private List<ImageListBean> image_list;
                private UseDateBean use_date;

                @Data
                public static class CanNoUseDateBaen implements Serializable {


                    private boolean enable;
                }

                @Data
                public static class UseTimeBaen implements Serializable {


                    private Integer use_time_type;
                }

                @Data
                public static class RealNameInfoBaen implements Serializable {


                    private boolean enable;
                    private int scene;
                }
                @Data
                public static class AppointmentBean implements Serializable {


                    private boolean need_appointment;
                    private int ahead_time_type;
                }


                @Data
                public static class DescriptionRichTextBaen implements Serializable {

                    private int note_type;
                    private String content;
                }

                @Data
                public static class EnvironmentImageListBaen implements Serializable {

                    private String url;
                }

                @Data
                public static class CustomerReservedInfoBaen implements Serializable {

                    private boolean allow;
                    private boolean allow_tel;
                }

                @Data
                public static class ImageListBean implements Serializable {

                    private String url;
                }

                @Data
                public static class UseDateBean implements Serializable {

                    private int use_date_type;
                    private int day_duration;
                    private String use_start_date;
                    private String use_end_date;
                }
            }

            @Data
            public static class PoiListBean implements Serializable {
                /**
                 * supplier_ext_id : 6878279715904325632
                 * poi_id : 6878279715904325632
                 */

                private String supplier_ext_id;
                private String poi_id;
            }
        }
        @Data
        public static class CommissionInfoBean implements Serializable {
            /**
             * platform_take_rate : 350
             */

            private int platform_take_rate;
        }


        @Data
        public static class SkuBean implements Serializable {
            /**
             * update_time : 1670988818
             * origin_amount : 4800
             * create_time : 1637309716
             * actual_amount : 990
             * sku_id : 1716840727677966
             * sku_name : 【限时活动·新客专享·周六日通用】9.9新客首单优惠
             * stock : {"limit_type":2,"stock_qty":10000000000}
             * attr_key_value_map : {"take_rate":"60","commodity":"[{\"group_name\":\"剪发券\",\"total_count\":1,\"option_count\":1,\"item_list\":[{\"name\":\"9.9新客单次剪发\",\"price\":4800,\"count\":1,\"unit\":\"份\"}]}]","settle_type":"1","use_type":"1","refund_need_merchant_confirm":"false","refund_type":"[\"过期退款\",\"随时退款\"]","limit_buy_rule":"{\"enable_limit\":true,\"rule_list\":[{\"subject_type\":1,\"range_type\":3,\"limit_num\":1,\"unit\":\"张\"}]}","code_source_type":"1","limit_rule":"{\"is_limit\":true,\"total_buy_num\":1}"}
             * status : 1
             */

            private int update_time;
            private int origin_amount;
            private int create_time;
            private int actual_amount;
            private String sku_id;
            private String sku_name;
            private StockBean stock;
            private AttrKeyValueMapBeanX attr_key_value_map;
            private int status;

            @Data
            public static class StockBean implements Serializable {
                /**
                 * limit_type : 2
                 * stock_qty : 10000000000
                 */

                private int limit_type;
                private long stock_qty;
            }

            @Data
            public static class AttrKeyValueMapBeanX implements Serializable {
                /**
                 * take_rate : 60
                 * commodity : [{"group_name":"剪发券","total_count":1,"option_count":1,"item_list":[{"name":"9.9新客单次剪发","price":4800,"count":1,"unit":"份"}]}]
                 * settle_type : 1
                 * use_type : 1
                 * refund_need_merchant_confirm : false
                 * refund_type : ["过期退款","随时退款"]
                 * limit_buy_rule : {"enable_limit":true,"rule_list":[{"subject_type":1,"range_type":3,"limit_num":1,"unit":"张"}]}
                 * code_source_type : 1
                 * limit_rule : {"is_limit":true,"total_buy_num":1}
                 */

                private String take_rate;
                private List<CommodityBean> commodity;
                private String settle_type;
                private String use_type;
                private String refund_need_merchant_confirm;
                private List<String> refund_type;
                private LimitBuyRuleBean limit_buy_rule;
                private String code_source_type;
                private LimitRuleBean limit_rule;

                @Data
                public static class CommodityBean implements Serializable {

                    private String group_name;
                    private int total_count;
                    private int option_count;
                    private List<ItemListBean> item_list;

                    @Data
                    public static class ItemListBean implements Serializable {

                        private String name;
                        private long price;
                        private int count;
                        private String unit;
                    }

                }
                @Data
                public static class LimitBuyRuleBean implements Serializable {

                    private boolean enable_limit;
                    private List<RuleListBean> rule_list;
                    @Data
                    public static class RuleListBean implements Serializable {

                        private int subject_type;
                        private int range_type;
                        private int limit_num;
                        private String unit;
                    }

                }
                @Data
                public static class LimitRuleBean implements Serializable {

                    private boolean is_limit;
                    private int total_buy_num;
                }
            }
        }
    }
}
